<?php htmlTemplate('admin_header_frame.php');?>
<div class="title">设置菜单
<?php if ($user['isadmin']!=3){?>
<a  href="<?php echo ZSM_WWW_HOST.'admin.php/admin/news/matchs/'?>" class="title_button">赛事列表</a>
<?php }?>
</div>
<script type="text/javascript">
function setThumbImg(src,id){

	$("#"+id).val(src);

}
function checkForm(){	
	var name = $.trim($("#name").val());	
	var type = $.trim($("#type").val());
	var info = $.trim($("#info").val());
	var logo1 = $.trim($("#logo1").val());
	var logo2 = $.trim($("#logo2").val());
	var space = $.trim($("#space").val());
	var link = $.trim($("#link").val());
	var stime = $.trim($("#stime").val());
	var etime = $.trim($("#etime").val());
	
	
	<?php
	if (@$row) {
		$url=ZSM_WWW_HOST.'admin.php/admin/video/matchsset/do/update/id/'.$row['id'];
	}else{
		$url=ZSM_WWW_HOST.'admin.php/admin/video/matchsset/do/add';
	}
	?>
	var url = '<?php echo $url;?>';
	
	$.post(url,{
		'name':name,
		'type':type,
		'info':info,
		'logo1':logo1,
		'logo2':logo2,
		'space':space,
		'link':link,
		'stime':stime,
		'etime':etime		
		},function(rs){
			parent.showAlert(rs);
			
	})
	
	return false;
}
</script>

<form action="" method="post" onsubmit="return checkForm();">
<table style="width:100%;line-height: 35px;">
	
	<?php 
	echoEditTr($row,'赛事名称','name',200);
	echoEditTr($row,'赛事类型','type',200,'select','type','type',array('atp1000','atp500','atp250','wtapremier','wtainternation'));
	echoEditTr($row,'赛事介绍','info',400);
	echoEditTr($row,'赛事logo','logo1',400,'thumb');
	echoEditTr($row,'ATP/WTA-logo','logo2',400,'thumb');
	echoEditTr($row,'地点','space');
	echoEditTr($row,'连接','link');
	echoEditTr($row,'开始时间','stime',80,'time');
	echoEditTr($row,'结束时间','etime',80,'time');
	?>

	
 
	
	<tr>
		<td align="right"  width="20%" ><input type="submit" class="submit" value="确 认">&nbsp;</td>
		<td align="left"  width="80%" >&nbsp;</td>
		
	</tr>
	
	
</table>
</form>
<script type="text/javascript">
function cutimg(thumbid)
{
	 
	if (!thumbid){
		thumbid='thumb';
	}
	var img = $.trim($("#"+thumbid).val());
	if (img ==''){
		parent.showAlert('请先上传图片！');
		return false;
	}
	var url = '<?php echo ZSM_WWW_HOST.'admin/api/cutimg?imgsrc='?>'+img+'&thumbid='+thumbid;
	showFrame(url,500,450);
}
function showSysimg(thumbid){
	if (!thumbid){
		thumbid='thumb';
	}
	 
	var url = '<?php echo ZSM_WWW_HOST.'admin/api/sysimg';?>'+'/thumbid/'+thumbid;
	showFrame(url,700,450);
}
</script>
<?php htmlTemplate('admin_footer_frame.php');?>